package org.chench.extra.logsift.enums;

/**
 * 日志转发类型
 * @author chench
 * @date 2025.05.21
 */
public enum ForwardType {
    /** 打印到控制台 */
    CONSOLE("console"),

    /** 发送到飞书群 */
    FEISHU("feishu"),

    /** HTTP地址 */
    HTTP("http"),

    /** WEB页面 */
    WEB("web");

    private String type;
    ForwardType(String type) {
        this.type = type;
    }

    public static ForwardType resolveValueOf(String type) {
        for (ForwardType ft : values()) {
            if (ft.getType().equals(type)) {
                return ft;
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}